import { defineStore } from "pinia";
import { ref } from "vue";
export const usePhoneStore = defineStore(
  "phone",
  () => {
    //定义状态的内容

    //1.响应式内容
    const phone = ref("");

    //2.定义一个函数，修改phone的值
    const setPhone = newPhone => {
      phone.value = newPhone;
    };

    //移除token的值
    const removePhone = () => {
      phone.value = "";
    };

    return {
      phone,
      setPhone,
      removePhone
    };
  },
  {
    persist: true
  }
);
